home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / TEMP / GNU / flex / Deficienci < prev    next >
Text File  |  1995-06-28  |  2KB  |  60 lines

  1. Deficiencies
  2. Previous: <Files=>Files> * Next: <See also=>Seealso> * Up: <Top=>!Root>
  3.  
  4. #Wrap on
  5. {fH3}Deficiencies \/ Bugs{f}
  6.  
  7. Some trailing context patterns cannot be properly matched
  8. and generate warning messages ("dangerous trailing
  9. context").  These are patterns where the ending of the first
  10. part of the rule matches the beginning of the second part,
  11. such as "zx\*\/xy\*", where the 'x\*' matches the 'x' at the
  12. beginning of the trailing context.  (Note that the POSIX
  13. draft states that the text matched by such patterns is
  14. undefined.)
  15.  
  16. For some trailing context rules, parts which are actually
  17. fixed-length are not recognized as such, leading to the
  18. abovementioned performance loss.  In particular, parts
  19. using '|' or \{n\} (such as "foo\{3\}") are always considered
  20. variable-length.
  21.  
  22. Combining trailing context with the special '|' action can
  23. result in {fEmphasis}fixed{f} trailing context being turned into the
  24. more expensive {fStrong}variable{f} trailing context.  For example, in
  25. the following:
  26.  
  27. #Wrap off
  28. #fCode
  29. %%
  30. abc      |
  31. xyz\/def
  32. #f
  33. #Wrap on
  34.  
  35. Use of {fEmphasis}unput(){f} invalidates yytext and yyleng, unless the
  36. {fEmphasis}%array{f} directive or the {fEmphasis}-l{f} option has been used.
  37.  
  38. Pattern-matching of NUL's is substantially slower than
  39. matching other characters.
  40.  
  41. Dynamic resizing of the input buffer is slow, as it
  42. entails rescanning all the text matched so far by the
  43. current (generally huge) token.
  44.  
  45. Due to both buffering of input and read-ahead, you cannot
  46. intermix calls to <stdio.h> routines, such as, for
  47. example, {fEmphasis}getchar(){f}, with {fCode}flex{f} rules and expect it to work.
  48. Call {fEmphasis}input(){f} instead.
  49.  
  50. The total table entries listed by the {fEmphasis}-v{f} flag excludes the
  51. number of table entries needed to determine what rule has
  52. been matched.  The number of entries is equal to the
  53. number of DFA states if the scanner does not use {fCode}REJECT{f}, and
  54. somewhat greater than the number of states if it does.
  55.  
  56. {fCode}REJECT{f} cannot be used with the {fEmphasis}-f{f} or {fEmphasis}-F{f} options.
  57.  
  58. The {fCode}flex{f} internal algorithms need documentation.
  59.  
  60.